Optimal. Leaf size=269 \[ -\frac {\sqrt {2} a^2 d^{5/2} \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {\sqrt {2} a^2 d^{5/2} \text {ArcTan}\left (1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {a^2 d^{5/2} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}+\frac {a^2 d^{5/2} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 269, normalized size of antiderivative = 1.00, number of steps
used = 16, number of rules used = 12, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.480, Rules used = {3624, 12, 16,
3554, 3557, 335, 217, 1179, 642, 1176, 631, 210} \begin {gather*} -\frac {\sqrt {2} a^2 d^{5/2} \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {\sqrt {2} a^2 d^{5/2} \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}+1\right )}{f}-\frac {a^2 d^{5/2} \log \left (\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{\sqrt {2} f}+\frac {a^2 d^{5/2} \log \left (\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{\sqrt {2} f}-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 16
Rule 210
Rule 217
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3554
Rule 3557
Rule 3624
Rubi steps
\begin {align*} \int (d \tan (e+f x))^{5/2} (a+a \tan (e+f x))^2 \, dx &=\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\int 2 a^2 \tan (e+f x) (d \tan (e+f x))^{5/2} \, dx\\ &=\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\left (2 a^2\right ) \int \tan (e+f x) (d \tan (e+f x))^{5/2} \, dx\\ &=\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {\left (2 a^2\right ) \int (d \tan (e+f x))^{7/2} \, dx}{d}\\ &=\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}-\left (2 a^2 d\right ) \int (d \tan (e+f x))^{3/2} \, dx\\ &=-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\left (2 a^2 d^3\right ) \int \frac {1}{\sqrt {d \tan (e+f x)}} \, dx\\ &=-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {\left (2 a^2 d^4\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (d^2+x^2\right )} \, dx,x,d \tan (e+f x)\right )}{f}\\ &=-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {\left (4 a^2 d^4\right ) \text {Subst}\left (\int \frac {1}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {\left (2 a^2 d^3\right ) \text {Subst}\left (\int \frac {d-x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}+\frac {\left (2 a^2 d^3\right ) \text {Subst}\left (\int \frac {d+x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}-\frac {\left (a^2 d^{5/2}\right ) \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}+2 x}{-d-\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}-\frac {\left (a^2 d^{5/2}\right ) \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}-2 x}{-d+\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}+\frac {\left (a^2 d^3\right ) \text {Subst}\left (\int \frac {1}{d-\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}+\frac {\left (a^2 d^3\right ) \text {Subst}\left (\int \frac {1}{d+\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=-\frac {a^2 d^{5/2} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}+\frac {a^2 d^{5/2} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {\left (\sqrt {2} a^2 d^{5/2}\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {\left (\sqrt {2} a^2 d^{5/2}\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}\\ &=-\frac {\sqrt {2} a^2 d^{5/2} \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {\sqrt {2} a^2 d^{5/2} \tan ^{-1}\left (1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {a^2 d^{5/2} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}+\frac {a^2 d^{5/2} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} f}-\frac {4 a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.29, size = 187, normalized size = 0.70 \begin {gather*} \frac {a^2 (d \tan (e+f x))^{5/2} \left (-70 \sqrt {2} \text {ArcTan}\left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right )+70 \sqrt {2} \text {ArcTan}\left (1+\sqrt {2} \sqrt {\tan (e+f x)}\right )-35 \sqrt {2} \log \left (1-\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right )+35 \sqrt {2} \log \left (1+\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right )-280 \sqrt {\tan (e+f x)}+56 \tan ^{\frac {5}{2}}(e+f x)+20 \tan ^{\frac {7}{2}}(e+f x)\right )}{70 f \tan ^{\frac {5}{2}}(e+f x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.25, size = 187, normalized size = 0.70
method | result | size |
derivativedivides | \(\frac {2 a^{2} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+\frac {2 d \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-2 d^{3} \sqrt {d \tan \left (f x +e \right )}+\frac {d^{3} \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4}\right )}{f d}\) | \(187\) |
default | \(\frac {2 a^{2} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+\frac {2 d \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-2 d^{3} \sqrt {d \tan \left (f x +e \right )}+\frac {d^{3} \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4}\right )}{f d}\) | \(187\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 219, normalized size = 0.81 \begin {gather*} \frac {20 \, \left (d \tan \left (f x + e\right )\right )^{\frac {7}{2}} a^{2} + 56 \, \left (d \tan \left (f x + e\right )\right )^{\frac {5}{2}} a^{2} d - 280 \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{3} + 35 \, {\left (2 \, \sqrt {2} d^{\frac {7}{2}} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right ) + 2 \, \sqrt {2} d^{\frac {7}{2}} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right ) + \sqrt {2} d^{\frac {7}{2}} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right ) - \sqrt {2} d^{\frac {7}{2}} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )\right )} a^{2}}{70 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 775 vs.
\(2 (225) = 450\).
time = 1.49, size = 775, normalized size = 2.88 \begin {gather*} -\frac {140 \, \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} f \arctan \left (-\frac {a^{8} d^{10} + \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {3}{4}} a^{2} d^{2} f^{3} \sqrt {\frac {d \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} - \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {3}{4}} f^{3} \sqrt {\frac {a^{4} d^{5} \sin \left (f x + e\right ) + \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} a^{2} d^{2} f \sqrt {\frac {d \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) + \sqrt {\frac {a^{8} d^{10}}{f^{4}}} f^{2} \cos \left (f x + e\right )}{\cos \left (f x + e\right )}}}{a^{8} d^{10}}\right ) \cos \left (f x + e\right )^{3} + 140 \, \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} f \arctan \left (\frac {a^{8} d^{10} - \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {3}{4}} a^{2} d^{2} f^{3} \sqrt {\frac {d \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} + \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {3}{4}} f^{3} \sqrt {\frac {a^{4} d^{5} \sin \left (f x + e\right ) - \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} a^{2} d^{2} f \sqrt {\frac {d \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) + \sqrt {\frac {a^{8} d^{10}}{f^{4}}} f^{2} \cos \left (f x + e\right )}{\cos \left (f x + e\right )}}}{a^{8} d^{10}}\right ) \cos \left (f x + e\right )^{3} - 35 \, \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} f \cos \left (f x + e\right )^{3} \log \left (\frac {a^{4} d^{5} \sin \left (f x + e\right ) + \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} a^{2} d^{2} f \sqrt {\frac {d \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) + \sqrt {\frac {a^{8} d^{10}}{f^{4}}} f^{2} \cos \left (f x + e\right )}{\cos \left (f x + e\right )}\right ) + 35 \, \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} f \cos \left (f x + e\right )^{3} \log \left (\frac {a^{4} d^{5} \sin \left (f x + e\right ) - \sqrt {2} \left (\frac {a^{8} d^{10}}{f^{4}}\right )^{\frac {1}{4}} a^{2} d^{2} f \sqrt {\frac {d \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) + \sqrt {\frac {a^{8} d^{10}}{f^{4}}} f^{2} \cos \left (f x + e\right )}{\cos \left (f x + e\right )}\right ) + 4 \, {\left (84 \, a^{2} d^{2} \cos \left (f x + e\right )^{3} - 14 \, a^{2} d^{2} \cos \left (f x + e\right ) + 5 \, {\left (a^{2} d^{2} \cos \left (f x + e\right )^{2} - a^{2} d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {\frac {d \sin \left (f x + e\right )}{\cos \left (f x + e\right )}}}{70 \, f \cos \left (f x + e\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{2} \left (\int \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}}\, dx + \int 2 \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \tan {\left (e + f x \right )}\, dx + \int \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \tan ^{2}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.79, size = 293, normalized size = 1.09 \begin {gather*} \frac {\sqrt {2} a^{2} d^{2} \sqrt {{\left | d \right |}} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{f} + \frac {\sqrt {2} a^{2} d^{2} \sqrt {{\left | d \right |}} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{f} + \frac {\sqrt {2} a^{2} d^{2} \sqrt {{\left | d \right |}} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{2 \, f} - \frac {\sqrt {2} a^{2} d^{2} \sqrt {{\left | d \right |}} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{2 \, f} + \frac {2 \, {\left (5 \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{9} f^{6} \tan \left (f x + e\right )^{3} + 14 \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{9} f^{6} \tan \left (f x + e\right )^{2} - 70 \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{9} f^{6}\right )}}{35 \, d^{7} f^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.30, size = 125, normalized size = 0.46 \begin {gather*} \frac {4\,a^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}}{5\,f}-\frac {4\,a^2\,d^2\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{f}+\frac {2\,a^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{7/2}}{7\,d\,f}-\frac {{\left (-1\right )}^{1/4}\,a^2\,d^{5/2}\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,2{}\mathrm {i}}{f}-\frac {2\,{\left (-1\right )}^{1/4}\,a^2\,d^{5/2}\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}}{\sqrt {d}}\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________